interface IPerson {
  name: string,
  age: number
}

interface IOrdered {
  serialNo: number,
  getSerialNo(): number
}

const news: IPerson & IOrdered = {
  name: 'Jim',
  age: 12,
  serialNo: 1,
  getSerialNo: function () {
    return this.serialNo;
  }
}

type EventNames = 'click' | 'scroll' | 'mouseover';

function handleEvent(ele: HTMLElement, event: EventNames): void {

}

handleEvent(document.createElement('h1'), 'click');

let person = { name: 'Jim', age: 10 } as IPerson;

let person2 = <IPerson>{ name: 'Jim', age: 13, address: 12 };